import { post, get } from './ajax'

// 服务层 services (集中所有接口)

export const http = {
  // 注册
  register: body => post('/maizuo/mzregister', body),

  // 登陆
  login: body => post('/maizuo/mzlogin', body),

  // 发送验证码
  sendcaptcha: params => get('/maizuo/mzsendcaptcha', params),

  // 校验验证码
  verifycaptcha: params => get('/maizuo/mzverifycaptcha', params),

  // 个人信息
  userinfo: params => get('/maizuo/mzgetuserinfo', params),

  // 上传头像
  sendavatar: body => post('/maizuo/mzsendavatar', body),

  // 修改密码
  modifypassword: body => post('/maizuo/mzmodifypassword', body)

}
